feat(bench): add condition matrix, tracing, oracle grading, and report to the agent benchmark - #460
Merged
Merged
Conversation
…t to the agent benchmark Refs #414. Implements the harness parts of SPEC-414: wright/knowledge/network cells with canaries and a scrubbed environment, a matrix runner with retries, the wright shim with envelope and serve tracing, entry snapshots, expectation detectors and friction metrics, per-turn usage and context reporting, upstream-oracle grading with disagreement output, negative-overlay calibration, and a report with intervals, paired comparison, and eval diagnostics. Adds a Claude Code reference adapter. Scenarios for the new OPY requirements and the guide-tuning loop are not included.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #414. Implements the harness side of
SPEC-414(merged as #459). The spec is not complete: see "Not included".What it adds (
benchmarks/agent, split into small modules besideagent_bench.py):run --wright-level none|bin|bin+skill --knowledge none|wiki|web --network off|on, andmatrix(agents x cells x scenarios x trials, shuffled by a seed, resumable, infrastructure exit 75 retried). Each run gets a freshHOME, an allowlisted environment, and canaries; a failed canary marks the runinvalid.BENCH_*variables; the adapter reports per-turn usage, a transcript, and its loaded context.adapters/claude_code.pyis a reference adapter. A pi adapter only needs to implement the same three files.wright check,wright compile, emitted Workshop text, and the pinned upstream OverPy9.7.10oracle underoracle/), withdisagreementoutput as an owner-issue reproducer. New check kinds:oracle,wright-compile,compiled-contains/compiled-absent.validatealso calibratesnegative/overlays. Results carry a grader hash.ok,exit, diagnostic codes,input_identity,selection) and teeswright servesessions; the entry file is snapshotted after each write and every snapshot is graded, giving first-valid index and regressions.unavailableuntil a normalized transcript exists.report [--regrade]gives usable rates with Wilson intervals, tokens per usable result, paired comparison (tokens only where both are usable), per-scenario/split tables, expectations, friction, and eval diagnostics from the automated eval-design article (headroom, variance, infrastructure failures, grader consistency).wright-agent-bench/v2; the oldbaseline/wrightconditions are replaced by the levels above.docs/agent-benchmark.mdand the spec (REQ-025 to REQ-027, Q-004) are updated.Verification
python3 -m unittest discover -s benchmarks/agent: 19 tests pass against a wright 0.4.0 binary, including the real oracle aftersetup-oracle; without node they skip the oracle test only.validatepasses for all four scenarios.bin+skill,understand-score-flow): usage, loaded context, and the guide were recorded, and the report rendered. That is a smoke check, not a benchmark result.validateandunittestas before; neither needs node.Not included
ana-paintballand the others in REQ-005), so no scenario usesoracleorcompiled-containsyet. They need reference solutions and negatives first.